package com.yootk;
import java.io.File;
public class YootkDemo2 {
    public static void main(String[] args) throws Exception {
        File file = new File("e:" + File.separator);
        info(file);
    }
    public static void info(File file) {
        if (file.isDirectory()) {
            File list[] = file.listFiles((f) -> f.isDirectory() ? true:
                    f.getName().endsWith(".txt"));
            if (list != null) {
                for (File temp : list) {
                    info(temp);
                }
            }
        } else {
            System.out.println(file);
        }
    }
}
